package com.bs.alibabacontentconsumer.controller;

import com.bs.alibabacontentconsumer.feign.AccountOpenFeignClients;
import com.bs.alibabacontentconsumer.pojo.Account;
import com.bs.alibabacontentconsumer.service.AccountService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author: Tvemic⁹
 * @DateTime: 2022/7/5 9:30
 * @Description: TODO
 */

@RestController
@RequestMapping("/account")
public class AccountController {

    @Resource
    AccountService accountService;

    @Resource
    AccountOpenFeignClients accountOpenFeignClients;


    @RequestMapping(value = "/upd" ,method = RequestMethod.POST)
    public void updAccount(Account account){
        account = accountOpenFeignClients.sentAccount();
        accountService.updateAccountInfo(account);

    }

}
